﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Runda.EShop.Bll;
using Runda.EShop.Common.Entity;

namespace Runda.EShop.Web.Order
{
    public partial class OrderDetailOrginal : BasePage
    {
        public Guid OrderID
        {
            get
            {
                if (Request.QueryString["OrderID"] != null)
                {
                    return new Guid(Request.QueryString["OrderID"]);
                }
                return Guid.Empty;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Initialize();
            }
        }

        private void Initialize()
        {

            GetOrderDetail();
        }

        private void GetOrderDetail()
        {
            if (OrderID == Guid.Empty) return;
            BizOrderDetailBll bll = new BizOrderDetailBll();
            List<BizOrderDetailEntity> list = bll.GetAll<BizOrderDetailEntity>(" and orderid='"+OrderID+"'");
            gvOrderDetail.DataSource = list;
            gvOrderDetail.DataBind();
        }
    }
}